package com.by.bean;

import com.by.group.ISave;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.validation.constraints.NotBlank;

/**
 * @author :LYJ
 * @version : 1.0
 * @date : 2025/2/17 19:22
 * @desc :
 * @since : JDK17
 */
@Data
//@AllArgsConstructor
@NoArgsConstructor
@ApiModel(value = "用户")
public class User {
    @ApiModelProperty(value = "用户id")
    int id;
    @ApiModelProperty(value = "用户账号")
    String account;
    @ApiModelProperty(value = "用户密码")
    String password;
    @ApiModelProperty(value = "用户类型:1.平台用户\n" + "2.客户\n" + "3.供应商\n" + "4.贷代\n")
    int type;

    public User(@NotBlank(message = "账号不能为空！", groups = {ISave.class}) String account, @NotBlank(message = "密码不能为空！", groups = {ISave.class}) String password, int supplierUser) {
        this.account = account;
        this.password = password;
        this.type = supplierUser;
    }
}
